import request from "@/utils/request";

// 新增地区
export function areaAdd(data) {
  return request({
    url: `/backAdmin/areaApi/add`,
    method: "post",
    data: data,
  });
}

// 地区树列表
export const listArea = (query) => {
  return request({
    url: "/backAdmin/areaApi/tree",
    method: "get",
    params: query,
  });
};


// 查询地区详细
export function getNotice(noticeId) {
  return request({
    url: "/system/notice/" + noticeId,
    method: "get",
  });

}

// 修改地区
export function updateArea(data) {
  return request({
    url: "/backAdmin/areaApi/update",
    method: "post",
    data: data,
  });
}

// 删除地区
export function delArea(areaIdList) {
  return request({
    url: `/backAdmin/areaApi/delete?areaIdList=${areaIdList}`,
    method: "post",
  });
}

